<?php /* Smarty version 2.6.20, created on 2017-07-16 15:03:05
         compiled from order_payment.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'order_payment.htm', 59, false),array('modifier', 'date_format', 'order_payment.htm', 62, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>付款订单</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
</head>
<body>
<div class="container">
    <div class="flow">
        <div class="itemtitle">
            <h3>付款订单</h3>
            <ul>
                <li class="current"><a href="?m=<?php echo $_GET['m']; ?>
&s=<?php echo $_GET['s']; ?>
"><span>管理</span></a></li>
			</ul>
        </div>
    </div>
    <div class="h35"></div>
    <form action="" method="get">
    <input type="hidden" name="m" value="<?php echo $_GET['m']; ?>
">
    <input type="hidden" name="s" value="order_payment.php">
    <table class="select_table">
        <tr>    
            <td>
            	<div class="select_box">
                <input placeholder="请输入订单编号..." type="text" name="code" class="w250" value="<?php echo $_GET['code']; ?>
"  />
                <input type="submit" value="搜索" />
                <a class="refresh" href="?m=<?php echo $_GET['m']; ?>
&s=<?php echo $_GET['s']; ?>
&status=<?php echo $_GET['status']; ?>
"></a>
                </div>
           </td>
        </tr>
    </table>
    </form>
    <table class="table product">
       <tbody>
       <tr class="header">
            <th width="30">查看</th>
            <th width="80">操作</th>
            <th class="al">订单编号</th>
            <th width="150">订单总额</th>
            <th width="100">支付方式</th>
            <th width="100">支付状态</th>
            <th width="150">创建时间</th>
            <th width="150">完成时间</th>
            <th width="150">支付IP</th>
        </tr>
        <?php $_from = $this->_tpl_vars['de']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
        <tr>
            <td><a href="?m=product&s=order_detail.php&oid=<?php echo $this->_tpl_vars['list']['order_id']; ?>
"><?php echo $this->_tpl_vars['lookimg']; ?>
</a></td>
            <td>
            <?php if ($this->_tpl_vars['list']['status'] == 1): ?>
            <a class="a-opear" data-type="pay" data-param="{'id':'<?php echo $this->_tpl_vars['list']['order_id']; ?>
'}" href="#">付款</a>
            <?php else: ?>
            已付款
            <?php endif; ?>
            </td>
            <td class="al"><?php echo $this->_tpl_vars['list']['order_id']; ?>
</td>
            <td><?php echo $this->_tpl_vars['config']['money']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['list']['money'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</td>
            <td><?php echo $this->_tpl_vars['list']['payment_name']; ?>
</td>
            <td><?php echo $this->_tpl_vars['list']['order_pay_status']; ?>
</td>
            <td><?php echo ((is_array($_tmp=$this->_tpl_vars['list']['start_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d&nbsp;%H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d&nbsp;%H:%M:%S")); ?>
</td>
            <td><?php if ($this->_tpl_vars['list']['end_time']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['list']['end_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d&nbsp;%H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d&nbsp;%H:%M:%S")); ?>
<?php endif; ?></td>
            <td><?php echo $this->_tpl_vars['list']['ip']; ?>
<?php echo $this->_tpl_vars['list']['IP']; ?>
</td>
        </tr>
        <?php endforeach; else: ?>
        <tr>
            <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
        </tr>
        <?php endif; unset($_from); ?>
		</tbody>
        <tfoot>
            <tr>
                <td colspan="99">
                	<div class="fl">每页最多显示： 20条</div>
                    <div class="page"><?php echo $this->_tpl_vars['de']['page']; ?>
</div>
                    <div class="fr">共有<?php echo $this->_tpl_vars['de']['count']; ?>
条记录</div>
                </td>
            </tr>
        </tfoot>
    </table>
<script>
$(".a-opear").live('click',function(){
	
	var data = $(this).attr('data-param');
	eval("data = "+data);
	var type = $(this).attr('data-type');
	if(!data.id)
	{
		error('error','对不起，请选择订单后操作！');
		return false;
	}
	window.parent.ajax_form("order", "操作订单", '<?php echo $this->_tpl_vars['config']['weburl']; ?>
/admin/module.php?m=product&s=order_opear.php&type='+type+'&orderid='+data.id, 800);
	return false;
	
});
$('.operate').hover(function(){					 
	if ($(this).position().top + $(this).children("ul").height() + $(this).parent("td").height() - $(window).height()- $(window).scrollTop()  < 0) {
		$(this).addClass("hover");
		$(this).children("ul").css("top", "22px");
	} else {
		$(this).addClass("hover-up");
		$(this).children("ul").css("top", -$(this).children("ul").height());
	}
},function(){
	$(this).removeClass("hover").removeClass("hover-up");	
});
</script>    
</div>
</body>
</html>